You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run authenticated editor browser commands on the direct local WordPress Playground origin so Gutenberg and its REST graph stay same-origin without entering the serialized preview proxy queue. Keep the proxy unchanged for exposed preview and reviewer URLs.
What changed
Preserve the upstream WordPress URL separately when wrapping a Playground server with the preview proxy.
Force wordpress.editor-open, wordpress.editor-actions, and wordpress.editor-validate-blocks internal sessions onto that local WordPress origin.
Remove the superseded response/header origin rewriting and mocked REST-preflight assertions.
Make browser-evaluated editor mutation/state/save logic source-launcher-safe by avoiding named closures that tsx rewrites with unavailable helpers.
Add the bounded real-runtime gate npm run test:editor-actions-save-integration.
Verification
npm run test:editor-actions-save-integration: passed against real WordPress Playground 6.5 in 13.0s. It creates a page, runs updateBlockAttributes, savePost, reload, and inspectState, then compares the post-reload editor SHA-256 with live get_post_field('post_content') SHA-256.
node --import tsx tests/browser-callback-materialization-contracts.test.ts: passed; proxy FIFO serialization and the separate WordPress origin contract remain covered.
No public command API changes. Proxy request serialization, preview routes, reviewer access, CORS policy, and network security are unchanged. The runtime change is limited to authenticated editor command sessions and generic editor browser-context serialization; there are no SSI or block-name special cases.
Change kind: runtime-origin routing correction plus real integration coverage.
Verification capability: real Playground editor mutation/save/reload persistence, not mocked proxy contracts.
Scope rationale: the direct origin already exists inside the Playground server; this change carries it alongside the externally exposed proxy URL and consumes it only for editor commands.
AI assistance
AI assistance: Yes
Tool(s): Homeboy (OpenCode)
Model: openai/gpt-5.6-sol
Used for: traced runtime-origin behavior, implemented and verified the bounded repair, and updated PR evidence.
Real end-to-end gate is currently failing, so this PR is draft.
The focused proxy contract passes, but the actual SSI recipe using this branch's source launcher timed out twice at wordpress.editor-actions after 25 minutes.
The command timeline identifies the regression:
Front-page editor open completes normally.
Contact editor open starts at 17:53:46 and does not settle before the outer timeout at 18:15:04.
Rewriting REST roots to the proxy sends Gutenberg preload/API traffic into the proxy's intentionally serialized one-request queue.
The editor never reaches the mutation/save sequence, so this does not fix #2095 end to end.
Required before ready:
Preserve same-origin editor REST behavior without routing the editor's REST preload graph through the serialized preview proxy.
Add a bounded real wordpress.editor-actions integration gate that opens an existing page, mutates a block, saves, reloads, and verifies the persisted content identity.
Rerun the original typed Description List proof successfully.
Full downstream Gutenberg proof passed against rebased commit 96eb20d3565ab191588eb8a464c223c436f9a12a using SSI #729 and released Blocks Engine PHP transformer 0.4.8.
Evidence from WP Codebox recipe run run_1a0fb91b0bc14d989faaff472ef5c297:
post-save wp.blocks.validateBlock: 150/150 valid, 0 invalid, including four Description List blocks
Repo-native regression command: npm run test:editor-actions-save-integration. The full downstream matrix is generated through SSI bench/static-site-fixture-matrix.bench.mjs; the relevant browser sequence is wordpress.editor-actions (updateBlockAttributes, savePost, reload, inspectState) followed by wordpress.editor-validate-blocks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Run authenticated editor browser commands on the direct local WordPress Playground origin so Gutenberg and its REST graph stay same-origin without entering the serialized preview proxy queue. Keep the proxy unchanged for exposed preview and reviewer URLs.
What changed
wordpress.editor-open,wordpress.editor-actions, andwordpress.editor-validate-blocksinternal sessions onto that local WordPress origin.tsxrewrites with unavailable helpers.npm run test:editor-actions-save-integration.Verification
npm run test:editor-actions-save-integration: passed against real WordPress Playground 6.5 in 13.0s. It creates a page, runsupdateBlockAttributes,savePost,reload, andinspectState, then compares the post-reload editor SHA-256 with liveget_post_field('post_content')SHA-256.node --import tsx tests/browser-callback-materialization-contracts.test.ts: passed; proxy FIFO serialization and the separate WordPress origin contract remain covered.node --import tsx tests/editor-actions.test.ts: passed.npm run build: passed.Compatibility and scope
No public command API changes. Proxy request serialization, preview routes, reviewer access, CORS policy, and network security are unchanged. The runtime change is limited to authenticated editor command sessions and generic editor browser-context serialization; there are no SSI or block-name special cases.
Evidence
AI assistance